package com.wwe.kotlinstudy.util

import android.content.Context

/**
 * @name KotlinStudy
 * @package name：com.wwe.kotlinstudy.util
 * @anthor DavidZhang
 * @time 2018/3/28 11:36
 * @class describe
 */
class AppUtil private constructor() {

    init {
        throw Error("Do not need instantiate!")
    }

    companion object {
        private val DEBUG = true
        private val TAG = "AppUtil"

        /**
         * @Author: DavidZhang
         * @Date: 2018/3/28 12:26
         * @param null
         * @Description:
         *
         */
        fun getVerCode(context: Context): Int {
            val packageName = context.packageName
            var verCode = context.packageManager.getPackageInfo(packageName,0).versionCode
            return verCode
        }
    }


}